<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>js获取所在地</title>
	<link rel="stylesheet" href="">
	<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
</head>
<body>
<script type="text/javascript">
    document.write("IP: " + returnCitySN['cip'] + "<br>地区代码: " + returnCitySN['cid'] + "<br>所在地: " + returnCitySN['cname']);
  </script>
<script type="text/javascript">
    console.log("userAgent: " + navigator.userAgent + "<br><br>");
    console.log("appName: " + navigator.appName + "<br><br>");
    console.log("appCodeName: " + navigator.appCodeName + "<br><br>");
    console.log("appVersion: " + navigator.appVersion + "<br><br>");
    console.log("appMinorVersion: " + navigator.appMinorVersion + "<br><br>");
    console.log("platform: " + navigator.platform + "<br><br>");
    console.log("cookieEnabled: " + navigator.cookieEnabled + "<br><br>");
    console.log("onLine: " + navigator.onLine + "<br><br>");
    console.log("userLanguage: " + navigator.language + "<br><br>");
    console.log("mimeTypes.description: " + navigator.mimeTypes[1].description + "<br><br>");
    console.log("mimeTypes.type: " + navigator.mimeTypes[1].type + "<br><br>");
    console.log("plugins.description: " + navigator.plugins[3] + "<br><br>");
  </script>	
</body>
</html>